﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Uniforax.Core.Common;
using Uniforax.Core.GameActions;
using Uniforax.Core.Skills;
using Uniforax.Core.WorldFramework;

namespace Uniforax.Camp.TestData.TheTech
{
    ///<summary>可以解锁攻击力强化的能力。</summary>
    public class UnlockPowerUpAction : BaseGameAction
    {
        public override void Execute(ActionContext context)
        {
            var world = context.GameWorld;
            var playerData = world.GetPlayerData(context.PlayerId);
            playerData.SetField(Shared.UnlockPowerUpSkillId, true);
        }

        public override void Undo(ActionContext context)
        {
            var world = context.GameWorld;
            var playerData = world.GetPlayerData(context.PlayerId);
            playerData.SetField(Shared.UnlockPowerUpSkillId, false);
        }
    }
}
